package com.csdn.leon.view.dialog;

import android.app.Activity;
import android.content.Context;

import com.csdn.leon.base.R;

public class DialogHelper {

	public static WaitDialog getWaitDialog(Activity activity) {
		WaitDialog dialog = null;
		try {
			dialog = new WaitDialog(activity, R.style.waitDialog,
					R.layout.dialog_wait_layout);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return dialog;
	}

	public static CustomDialog getCustomDialog(Context context) {
		CustomDialog dialog = null;
		try {
			dialog = new CustomDialog(context, R.style.customDialog,
					R.layout.custom_dialog_layout);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return dialog;
	}
	
	
	public static ClickedItemDialog getItemDialog(Context context ,String username ,String title){
		ClickedItemDialog  dialog =null;
		try {
			dialog = new ClickedItemDialog(context, R.style.customDialog,
					R.layout.dialog_home_layout ,username ,title);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return dialog;
		
	}
	
	
	public static SearchDialog getSearchDialog(Context context){
		SearchDialog dialog =null;
		try {
			dialog = new SearchDialog(context, R.style.customDialog,
					R.layout.dialog_search_layout);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return dialog;
	}
	
	
}
